package com.songlanyun.modules.article.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.modules.article.entity.Article;
import com.songlanyun.modules.article.model.dto.ArticleDTO;
import com.songlanyun.modules.article.model.vo.ArticleVO;
import com.songlanyun.modules.comment.entity.UserComment;
import org.springframework.data.redis.core.BoundHashOperations;

import java.util.List;
import java.util.Map;

/**
 * 文章表
 *
 * @author wuchao
 * @email sunlightcs@gmail.com
 * @date 2021-02-27 15:36:01
 */
public interface ArticleService extends IService<Article> {

    PageUtils queryPage(Map<String, Object> params);

    void saveArticle(ArticleDTO dto, Long userId);

    void updateArticle(ArticleDTO dto);

    Article getById(Long aid, boolean isThrow);

    void setRecommend(Long id, Boolean isRecommend);

    ArticleVO info(Long id);

    PageUtils appList(Map<String, Object> params);

    PageUtils recommendList(Map<String, Object> params);

    PageUtils hotList(Map<String, Object> params);

    Boolean ifCreateArticle(Long cid);

    void del(Long id);

    void added(Long aid, Boolean added);

    ArticleVO appInfo(Long userId, Long id);

    void comment(UserComment userComment);

    Map<String, Object> cancelLike(Long id, Long userId);
}

